import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)
const routes = [
  {
    path: '/',
    name: 'mian',
    component:()=>import('./../views/mian.vue'),
      redirect:'/about',
      children:[
      {
          path: '/about',//校园
          name: 'about',
         component: () => import('../views/AboutView.vue')
      },
        {
            path: '/class',//分类
            name: 'class',
            component: () => import('../views/class.vue')
        },
        {
            path: '/Popular',//热门
            name: 'Popular',
            component: () => import('../views/Popular.vue')
        }
    ],
  },
    {
        path: '/news',
        name: 'news',
        component:()=> import('./../views/news.vue'),
    },
    {
        path: '/idle',
        name: 'idle',
        component:()=> import('./../views/idle.vue'),

    },
    {
        path: '/school',
        name: 'school',
        component:()=> import('./../views/school.vue'),

    },
    {
        path: '/404',
        name: '404',
        component:()=> import('./../views/404.vue'),

    },
    {
        path: '/newList',
        name: 'newList',
        component:()=> import('./../views/newList.vue'),

    },
    {
        path: '/Search',
        name: 'newList',
        component:()=> import('./../components/Search.vue'),

    },
    {
        path: '/details',
        name: 'details',
        component:()=> import('./../views/details.vue'),

    }
]

const router = new VueRouter({
  routes
})

export default router
